<?
$r = "";
$p = "sitemap";
include $r."_header.php";
?>

<?

$sitemap = array();
// $sitemap[][<t>] - text item
// $sitemap[][<p>] - page item
// $sitemap[][<s>] - sub group items


$sitemap[] = array('p'=>"home");


$sitemap[] = array('t'=>"Newcomers", 's'=>array(
    array('p'=>"features"),
    array('p'=>"case_studies"),
    array('p'=>"signup"),
    array('p'=>"plans"),
    array('p'=>"faq")
    
));

$sitemap[] = array('t'=>"Members", 's'=>array(
   array('p'=>"login"),
   array('p'=>"news"),
   array('p'=>"password_recovery"),
));


$sitemap[] = array('t'=>"Company", 's'=>array(
   array('p'=>"about"),
   array('p'=>"press"),
   array('p'=>"contact"),
   array('p'=>"privacy"),
));


$sitemap[] = array('p'=>"sitemap");



function print_sitemap_item($item, $is_sub=false)
{
	if (isset($item['t']))
	{
		return '<p class="textBold">'.$item['t'].'</p>';
	}
	
	global $r, $g_site_struct;
	$s = @$g_site_struct[$item['p']]['t'];
	$l = @$g_site_struct[$item['p']]['l'];
	
	if ($l != "") $s = '<a href="'.$r.$l.'">'.$s.'</a>';
    if (!$is_sub) 
    {
	    $s = '<p class="text">'.$s."</p>";
    }
	return $s;
}

foreach($sitemap as $v)
{
	echo print_sitemap_item($v)."\n";
	
	if (isset($v['s']))
	{
		echo '<ul style="margin-top: 0; margin-bottom: 0;">'."\n";
		foreach($v['s'] as $v2)
		{
			echo "\t".'<li>'.print_sitemap_item($v2, true).'</li>'."\n";
		}
		echo '</ul>'."\n";
	}
}
?>
<br>



<?
include $r."_footer.php";
?>